Connectivity Software User's Guide and Reference
AddAttributesForInstance(Object,Boolean,String,Attribute[]) Method



OpcLabs.BaseLibPrimitives Assembly > OpcLabs.BaseLib.ComponentModel.Internal Namespace > AttributeStore Class > AddAttributesForInstance Method : AddAttributesForInstance(Object,Boolean,String,Attribute[]) Method
The instance the member lives on.

The value of this parameter cannot be null (Nothing in Visual Basic).

Also adds attributes to all equal instances.
The member to add attributes for.

The value of this parameter can be null (Nothing in Visual Basic).

The new attributes to add.

The value of this parameter cannot be null (Nothing in Visual Basic).

The individual elements of the parameter value cannot be null (Nothing in Visual Basic).

Adds attributes to the member with the given name.
Syntax
'Declaration
 
Public Overloads Sub AddAttributesForInstance( _
   ByVal instance As Object, _
   ByVal alsoEqual As Boolean, _
   ByVal memberName As String, _
   ByVal ParamArray attributes() As Attribute _
) 
'Usage
 
Dim instance As AttributeStore
Dim instance As Object
Dim alsoEqual As Boolean
Dim memberName As String
Dim attributes() As Attribute
 
instance.AddAttributesForInstance(instance, alsoEqual, memberName, attributes)
public void AddAttributesForInstance( 
   object instance,
   bool alsoEqual,
   string memberName,
   params Attribute[] attributes
)
public:
void AddAttributesForInstance( 
   Object^ instance,
   bool alsoEqual,
   String^ memberName,
   ... array<Attribute^>^ attributes
) 

Parameters

instance
The instance the member lives on.

The value of this parameter cannot be null (Nothing in Visual Basic).

alsoEqual
Also adds attributes to all equal instances.
memberName
The member to add attributes for.

The value of this parameter can be null (Nothing in Visual Basic).

attributes
The new attributes to add.

The value of this parameter cannot be null (Nothing in Visual Basic).

The individual elements of the parameter value cannot be null (Nothing in Visual Basic).

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also